<template>
	<view class="container">
		<view class="carousel">
			<swiper circular=true duration="400" @change="currentChange">
				<swiper-item class="swiper-item" v-for="(item,index) in productInfo.imageArr" :indicator-dots="productInfo.productType!=2"
				 :key="index">
					<view class="image-wrapper">
						<image :src="item" class="loaded" mode="aspectFill"></image>
					</view>
				</swiper-item>
			</swiper>
			<view class="timeout" v-if="productInfo.productType==2">
				<view class="ts">距结束:</view>
				<view class="h">11</view>
				<view class="m">22</view>
				<view class="s">33</view>
			</view>
			<view class="swiper_current" v-if="productInfo.productType==2">{{current}}/{{productInfo.imageArr.length}}</view>
		</view>

		<view class="introduce-section">
			<text class="title">{{productInfo.name}}</text>
			<view class="price-box">
				<text class="price-tip">¥</text>
				<text class="price">{{ usertype==1? productInfo.agentPrice:productInfo.price}}</text>
				<text class="m-price" v-if="usertype==1">¥{{productInfo.price}}</text>
				<!-- <text class="coupon-tip">7折</text> -->
			</view>
			<view class="activity-box" v-if="productInfo.isActivity==1 && productActivity">
				<text class="activity-i">{{productActivity.abbreviation}}</text>
				<text class="activity-t">{{productActivity.content}}</text>
			</view>
			<view class="bot-row">
				<!-- <text>销量</text> -->
				<text><text class="xll">销量</text>已售{{productInfo.sales}}件，仅剩{{productInfo.stock}}件</text>
				<!-- <text>仅剩: {{productInfo.stock}}件</text> -->
				<!-- <text>浏览量: 768</text> -->
			</view>
		</view>

		<view class="merchant-v">
			<view class="merchant-v-l">
				<image :src=" businessInfo.image || '../../static/errorImage.jpg'" mode="widthFix"></image>
			</view>
			<view class="merchant-v-r">
				<view class="top">{{businessInfo.name}}</view>
				<view class="bottom">
					<text>取货地址：</text>
					<text class="addre">{{businessInfo.address}}</text>
				</view>
			</view>
		</view>

		<!-- 商品评价 -->
		<view v-if="commentTotalSize>0" class="eva-section" @tap="toCommentList">
			<view class="e-header">
				<text class="tit">商品评价</text>
				<text>({{commentTotalSize}})</text>
				<text class="tip">查看更多</text>
				<text class="yticon icon-you"></text>
			</view>
			<view class="eva-box" v-for="(item,index) in orderCommentList" :key="index">
				<image class="portrait" :src="item.userImage" mode="aspectFill"></image>
				<view class="right">
					<text class="name">{{item.UserName}}</text>
					<text class="con">{{item.content}}</text>
					<view class="bot">
						<!-- <text class="attr">购买数量：100件</text> -->
						<text class="time">{{item.createdDate}}</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 购买记录 -->
		<view class="eva-section" @tap="toPayHistory" v-if="buytotalSize>0">
			<view class="e-header">
				<text class="tit">购买记录</text>
				<text class="tip">已有<text class="numa">{{buytotalSize}}</text>人购买，商品共销售<text class="numa">{{productInfo.sales}}</text>份</text>
				<text class="yticon icon-you"></text>
			</view>
			<view class="eva-box gmjl">
				<image v-for="(item,index) in productBuyList" :key="index" :src="item.userImage" mode="aspectFill"></image>
				<image v-if="buytotalSize>=6" src="../../static/more.png" mode="aspectFill"></image>
			</view>
		</view>

		<view class="detail-desc">
			<view class="d-header">
				<text>商品详情</text>
			</view>
			<view class="productDescribe">{{productInfo.productDescribe}}</view>
			<!-- <rich-text :nodes="desc"></rich-text> -->
		</view>

		<view class="jgms">
			<view class="bt-v">
				<text>关干价格</text>
			</view>
			<view class="bt-v">
				<text>划线价格:</text>
			</view>
			<view class="nr-v">
				<text>指商品的厂商指导价、价签价格或该商品的曾经展示过的价格，并非原价，仅供巷考.</text>
			</view>
			<view class="bt-v">
				<text>未划线价格:</text>
			</view>
			<view class="nr-v">
				<text>指商品的实时价格，不因表述的差异改变性质.具体成交价根据商品參加活动发生変化，最终以订单结算页价格为准.</text>
			</view>
			<view class="bt-v">
				<text>关干包装:</text>
			</view>
			<view class="nr-v">
				<text>因源头会在没有任何提前通知的悄況下更改产品包装、产地或者一些附件，xxx不能确保客户收到的货物与序中图片、产地、附件说明完全一致，若xxx没有及时更新，请谅解！图片仅供参考，请以实物为准. </text>
			</view>
			<view class="bt-v">
				<text>关于退换货:</text>
			</view>
			<view class="nr-v">
				<text>生鲜水果类商品，若无质蜃问题不支持无理由退換以及拒收，敬请谅解；如有质置问踴，请在小程序微信通知提货后24小时内申请后，并提交商品的完整照片及相关证明，我们将及时为您进行售后处理.</text>
			</view>
			<view class="bt-v">
				<text>关干签收:</text>
			</view>
			<view class="nr-v">
				<text>为保障客户的权益，签收时请与团长当面核对无误再进行认领提货，如由他人代为提货而没有团长在场的情况下验货则视为客户所选昀的商品无任何问题.由于生鲜类商品的特殊性，如因个人原因(包括但不限于地址错读、无人签收、无法取得联系)导致提货延迟，造成商品异常、不予售后.</text>
			</view>
			<view class="bt-v">
				<text>关干重量:</text>
			</view>
			<view class="nr-v">
				<text>关于重量食品生鲜、水果蔬菜等非标品类商品在运送过成中会有小部分的水分蒸发流失，重量会有5%的损耗，超过的比例会按售价依比例进行相应的理賠.</text>
			</view>

		</view>

		<!-- 底部操作菜单 -->
		<view class="page-bottom">
			<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
				<text class="yticon icon-xiatubiao--copy"></text>
				<text>首页</text>
			</navigator>
			<navigator url="/pages/cart/cart" open-type="switchTab" class="p-b-btn">
				<uni-badge v-if="cartTotal>0" :text="cartTotal" type="error" size="small"></uni-badge>
				<text class="yticon icon-gouwuche"></text>
				<text>购物车</text>
			</navigator>

			<view class="action-btn-group">
				<button type="primary" class=" action-btn no-border buy-now-btn" @tap="nowBuyClick" data-type="0">立即购买</button>
				<button type="primary" class=" action-btn no-border add-cart-btn" @tap="nowBuyClick" data-type="1">加入购物车</button>
			</view>
		</view>


		<!-- 规格-模态层弹窗 -->
		<view class="popup spec" v-if="specClass=='show'">
			<!-- 遮罩层 -->
			<view class="mask" @tap="specShowOrHide"></view>
			<view class="layer attr-content">
				<view class="a-t">
					<image :src="productInfo.imageArr[0]"></image>
					<view class="right">
						<text class="title ycyc">{{productInfo.name}}</text>
						<text class="price">¥{{usertype==0?productInfo.price:productInfo.agentPrice}}</text>
						<text class="stock">库存：{{productInfo.stock}}件</text>
					</view>
				</view>
				<view class="b-t">
					<text>数量</text>
					<uni-number-box @eventChange="buyNumberChange" min="1" :max="productInfo.stock || 1" :value="buyNumber"></uni-number-box>
				</view>
				<button class="btn" @tap.stop="toggleSpec">完成</button>
			</view>
		</view>
		<my-share ref="myshare"></my-share>
	</view>
</template>

<script>
	import uniNumberBox from '@/components/uni-number-box.vue';
	import myshare from '@/components/my-share/my-share.vue';
	export default {
		components: {
			uniNumberBox,
			myshare
		},
		data() {
			return {
				buyNumber: 1, //购买数量
				specType: 0, //0-立即购买 1-加入购物车
				current: 1, //轮播index
				specClass: 'none', //数量弹窗
				productInfo: {}, //商品信息
				usertype: 0, //0普通用户 1代理
				businessInfo: uni.getStorageSync('businessInfo') || {}, //商家信息
				orderCommentList: [], //评价列表
				commentTotalSize: 0, //评价记录总数
				productBuyList: [], //购买记录列表
				buytotalSize: 0, //购买记录总数
				productActivity: {}, //活动信息
				cartTotal: 0, //购物车数量
			};
		},
		onLoad(options) {
			//接收传值
			let id = options.id;
			if (id) {
				//获取商家信息
				this.getDetail(id);
				//获取评价列表
				this.productCommentList(id);
				//获取购买记录
				this.getproductBuyList(id);
			}
			//获取商家信息
			this.getbusinessInfo();
		},
		onShow() {
			// 更新购物车数量
			if (uni.getStorageSync('userInfo')) {
				this.usertype = uni.getStorageSync('userInfo').isAgent;
				this.getcartNum();
			}
		},
		methods: {

			/*---------------------点击---------------------------------------------*/

			/**
			 * 跳转商品评价
			 */
			toCommentList: function() {
				let than = this;
				uni.navigateTo({
					url: '/pages/product/commentList?id=' + than.productInfo.id
				})
			},

			/**
			 * 点击-跳转购买记录列表
			 */
			toPayHistory: function() {
				uni.navigateTo({
					url: '/pages/product/buyHistory'
				})
			},

			/**
			 * 点击-立即购买或加入购物车
			 */
			nowBuyClick: function(e) {
				if (this.productInfo && this.productInfo.id) {
					if (this.productInfo.status == 1) {
						this.specType = Number(e.currentTarget.dataset.type); //0-立即购买 1-加入购物车
						// 数量加减弹窗
						this.specClass = 'show';
					} else {
						this.$api.msg('商品已下架');
					}
				}
			},

			/**
			 * 数量弹窗完成点击
			 */
			toggleSpec: function() {
				let than = this;
				try {
					let aa = setTimeout(function() {
						clearTimeout(aa);
						if (than.buyNumber > 0) {
							let flg = true;
							let msg = '';
							if (!uni.getStorageSync('userInfo')) {
								flg = false;
								msg = '请先登录';
							} else if (than.productInfo.restrictedPurchase != 0 && than.buyNumber > than.productInfo.restrictedPurchase) {
								//限购
								flg = false;
								msg = '限购' + than.productInfo.restrictedPurchase;
							}
							if (flg) {
								if (than.specType == 0) {
									//立即购买
									let map = than.productInfo;
									map.productNum = than.buyNumber;
									map.productActivity = than.productActivity;
									map.productName = map.name;
									map.productId = map.id;
									let goodsData = [map];
									uni.navigateTo({
										url: `/pages/order/createOrder?data=${JSON.stringify({goodsData: goodsData})}`
									})
								} else {
									//加入购物车
									than.addCart();
								}
							} else {
								than.$api.msg(msg);
							}
						} else {
							than.$api.msg('数量不能为0');
						}
					}, 100)
				} catch (e) {
					console.error(e)
				}
				this.specClass = 'hide';
			},
			/*------------------函数-----------------------------------------------------*/
			/**
			 * 加入购物车
			 */
			addCart: function() {
				let than = this;
				than.$api.myPost({
					url: 'addCart',
					data: {
						productId: than.productInfo.id,
						productNum: than.buyNumber,
						userCode: uni.getStorageSync('userInfo').userCode
					},
					success(res) {
						than.$api.msg(res.message);
						//查询购物车数量
						than.getcartNum();
						than.specClass = 'hide';
					},
				})
			},
			/**
			 * 购物车数量
			 */
			getcartNum: function() {
				let than = this;
				than.$api.myPost({
					url: 'cartProductNum',
					data: {
						userCode: uni.getStorageSync('userInfo').userCode
					},
					success(res) {
						if (res.status == 'success' && res.totalSize) {
							than.cartTotal = res.totalSize;
						} else {
							than.cartTotal = 0;
						}
					},
				})
			},
			/**
			 * 购买记录
			 */
			getproductBuyList: function(id) {
				let than = this;
				than.$api.myPost({
					url: 'productBuyList',
					data: {
						pageNo: 1,
						pageSize: 5,
						productId: id
					},
					success(res) {
						if (res.status == 'success' && res.productBuyList) {
							than.productBuyList = res.productBuyList;
							than.buytotalSize = res.totalSize;
						}
					}
				})
			},
			/**
			 * 评价列表
			 */
			productCommentList: function(id) {
				let than = this;
				than.$api.myPost({
					url: 'productCommentList',
					data: {
						pageNo: 1,
						pageSize: 3,
						productId: id
					},
					success(res) {
						if (res.status == 'success' && res.orderCommentList) {
							res.orderCommentList.forEach(o => {
								o.createdDate = than.$api.formatDate(o.createdDate, 'yyyy-mm-dd hh:mm:ss');
							})
							than.orderCommentList = res.orderCommentList;
							than.commentTotalSize = res.totalSize;
						}
					}
				})
			},

			/**
			 * 获取商家信息
			 */
			getbusinessInfo: function() {
				let than = this;
				than.$api.myPost({
					url: 'businessInfo',
					data: {},
					success(res) {
						if (res.status == 'success' && res.businessInfo) {
							than.businessInfo = res.businessInfo;
							uni.setStorageSync('businessInfo', res.businessInfo);
						}
					}
				})
			},
			/**
			 * 获取商品详情信息
			 */
			getDetail: function(productId) {
				let than = this;
				than.$api.myPost({
					url: 'productDetail',
					data: {
						productId: productId
					},
					success(res) {
						if (res.status == 'success' && res.productInfo) {
							res.productInfo.imageArr = res.productInfo.image.split(',');
							than.productInfo = res.productInfo;
							if (res.productActivity) {
								than.productActivity = res.productActivity;
							}
						}
					}
				})
			},

			/**
			 * 数量弹窗显示隐藏
			 */
			specShowOrHide: function() {
				this.specClass = this.specClass == 'hide' ? 'show' : 'hide';
			},


			/*------------------监听-----------------------------------------------------*/
			/**
			 * 购买数量监听
			 * @param {Object} e
			 */
			buyNumberChange: function(e) {
				this.buyNumber = e.number;
			},

			/**
			 * 轮播监听
			 */
			currentChange: function(e) {
				this.current = ++e.detail.current;
			},
		},

	}
</script>

<style lang='scss'>
	page {
		background: $page-color-base;
		padding-bottom: 160upx;
	}

	.icon-you {
		font-size: $font-base + 2upx;
		color: #888;
	}

	.carousel {
		height: 722upx;
		position: relative;

		swiper {
			height: 100%;
		}

		.image-wrapper {
			width: 100%;
			height: 100%;
		}

		.swiper-item {
			display: flex;
			justify-content: center;
			align-content: center;
			height: 750upx;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
			}
		}

	}

	/* 标题简介 */
	.introduce-section {
		background: #fff;
		padding: 30upx;
		width: 95%;
		margin: 0 2.5%;
		border-radius: 16rpx;
		margin-top: -50rpx;
		position: relative;
		z-index: 1;
		box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);

		.title {
			font-size: 32upx;
			color: $font-color-dark;
			height: 50upx;
			line-height: 50upx;
			font-weight: bold;
		}

		.price-box {
			display: flex;
			align-items: baseline;
			height: 64upx;
			padding: 10upx 0;
			font-size: 26upx;
			color: $uni-color-primary;
		}

		.price {
			font-size: $font-lg + 2upx;
		}

		.m-price {
			margin: 0 12upx;
			color: $font-color-light;
			text-decoration: line-through;
		}

		.coupon-tip {
			align-items: center;
			padding: 4upx 10upx;
			background: $uni-color-primary;
			font-size: $font-sm;
			color: #fff;
			border-radius: 6upx;
			line-height: 1;
			transform: translateY(-4upx);
		}

		.bot-row {
			display: flex;
			align-items: center;
			height: 50upx;
			font-size: $font-sm;
			color: $font-color-light;

			.xll {
				color: #303133;
				font-weight: bold;
				margin-right: 20rpx;
			}

			text {
				flex: 1;
			}
		}

		.activity-box {
			width: 100%;
			height: 100rpx;
			background-color: #FFF4EC;
			border-radius: 18rpx;
			line-height: 100rpx;
			padding: 0 30rpx;
			margin: 10rpx 0;

			.activity-i {
				color: #F35056;
				border: 2rpx solid #EDA6A6;
				border-radius: 20rpx;
				font-size: 22rpx;
				padding: 0 10rpx;
				margin-right: 10rpx;
			}

			.activity-t {
				color: #B87B53;
				font-size: 28rpx;
				font-weight: bold;
			}
		}
	}

	/* 分享 */
	.share-section {
		display: flex;
		align-items: center;
		color: $font-color-base;
		background: linear-gradient(left, #fdf5f6, #fbebf6);
		padding: 12upx 30upx;

		.share-icon {
			display: flex;
			align-items: center;
			width: 70upx;
			height: 30upx;
			line-height: 1;
			border: 1px solid $uni-color-primary;
			border-radius: 4upx;
			position: relative;
			overflow: hidden;
			font-size: 22upx;
			color: $uni-color-primary;

			&:after {
				content: '';
				width: 50upx;
				height: 50upx;
				border-radius: 50%;
				left: -20upx;
				top: -12upx;
				position: absolute;
				background: $uni-color-primary;
			}
		}

		.icon-xingxing {
			position: relative;
			z-index: 1;
			font-size: 24upx;
			margin-left: 2upx;
			margin-right: 10upx;
			color: #fff;
			line-height: 1;
		}

		.tit {
			font-size: $font-base;
			margin-left: 10upx;
		}

		.icon-bangzhu1 {
			padding: 10upx;
			font-size: 30upx;
			line-height: 1;
		}

		.share-btn {
			flex: 1;
			text-align: right;
			font-size: $font-sm;
			color: $uni-color-primary;
		}

		.icon-you {
			font-size: $font-sm;
			margin-left: 4upx;
			color: $uni-color-primary;
		}
	}

	.c-list {
		font-size: $font-sm + 2upx;
		color: $font-color-base;
		background: #fff;

		.c-row {
			display: flex;
			align-items: center;
			padding: 20upx 30upx;
			position: relative;
		}

		.tit {
			width: 140upx;
		}

		.con {
			flex: 1;
			color: $font-color-dark;

			.selected-text {
				margin-right: 10upx;
			}
		}

		.bz-list {
			height: 40upx;
			font-size: $font-sm+2upx;
			color: $font-color-dark;

			text {
				display: inline-block;
				margin-right: 30upx;
			}
		}

		.con-list {
			flex: 1;
			display: flex;
			flex-direction: column;
			color: $font-color-dark;
			line-height: 40upx;
		}

		.red {
			color: $uni-color-primary;
		}
	}

	/* 评价 */
	.eva-section {
		display: flex;
		flex-direction: column;
		padding: 30upx;
		background: #fff;
		width: 95%;
		margin: 0 2.5%;
		margin-top: 16upx;
		border-radius: 16rpx;
		box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);

		.e-header {
			display: flex;
			align-items: center;
			height: 70upx;
			font-size: $font-sm + 2upx;
			color: $font-color-light;
			border-bottom: 2rpx solid #DCDFE6;
			padding-bottom: 20rpx;

			.tit {
				font-size: $font-base + 2upx;
				color: $font-color-dark;
				margin-right: 4upx;
			}

			.tip {
				flex: 1;
				text-align: right;
			}

			.icon-you {
				margin-left: 10upx;
			}
		}
	}

	.eva-box {
		display: flex;
		padding: 20upx 0;

		.portrait {
			flex-shrink: 0;
			width: 80upx;
			height: 80upx;
			border-radius: 100px;
		}

		.right {
			flex: 1;
			display: flex;
			flex-direction: column;
			font-size: $font-base;
			color: $font-color-base;
			padding-left: 26upx;

			.con {
				font-size: $font-base;
				color: $font-color-dark;
				padding: 20upx 0;
			}

			.bot {
				display: flex;
				justify-content: space-between;
				font-size: $font-sm;
				color: $font-color-light;
			}
		}
	}

	/*  详情 */
	.detail-desc {
		background: #fff;
		margin-top: 16upx;

		.d-header {
			display: flex;
			justify-content: center;
			align-items: center;
			height: 80upx;
			font-size: $font-base + 2upx;
			color: $font-color-dark;
			position: relative;

			text {
				padding: 0 20upx;
				background: #fff;
				position: relative;
				z-index: 1;
			}

			&:after {
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translateX(-50%);
				width: 300upx;
				height: 0;
				content: '';
				border-bottom: 1px solid #ccc;
			}
		}

		.productDescribe {
			width: 100%;
			padding: 0 30rpx 40rpx;
		}
	}

	/* 规格选择弹窗 */
	.attr-content {
		padding: 10upx 30upx;

		.a-t {
			display: flex;

			image {
				width: 170upx;
				height: 170upx;
				flex-shrink: 0;
				margin-top: -40upx;
				border-radius: 8upx;
			}

			.right {
				/* display: flex; */
				/* flex-direction: column; */
				padding-left: 24upx;
				font-size: $font-sm + 2upx;
				color: $font-color-base;
				line-height: 42upx;
				width: 100%;

				text {
					width: 100%;
					display: inline-block;
				}

				.title {
					/* width: 54% !important; */
					font-weight: bold;
					font-size: 30rpx;
				}

				.price {
					font-size: $font-lg;
					color: $uni-color-primary;
					margin-bottom: 10upx;
				}

				.selected-text {
					margin-right: 10upx;
				}
			}
		}

		.b-t {
			display: flex;
			height: 70rpx;
			line-height: 70rpx;
			position: relative;
			margin-top: 50rpx;

			text {
				width: 100rpx;
				height: 70rpx;
				line-height: 70rpx;
				font-weight: bold;
			}

			&::after {
				border: none !important;
			}

			.uni-numbox {
				left: 100rpx;
			}
		}

		.attr-list {
			display: flex;
			flex-direction: column;
			font-size: $font-base + 2upx;
			color: $font-color-base;
			padding-top: 30upx;
			padding-left: 10upx;
		}

		.item-list {
			padding: 20upx 0 0;
			display: flex;
			flex-wrap: wrap;

			text {
				display: flex;
				align-items: center;
				justify-content: center;
				background: #eee;
				margin-right: 20upx;
				margin-bottom: 20upx;
				border-radius: 100upx;
				min-width: 60upx;
				height: 60upx;
				padding: 0 20upx;
				font-size: $font-base;
				color: $font-color-dark;
			}

			.selected {
				background: #fbebee;
				color: $uni-color-primary;
			}
		}
	}

	/*  弹出层 */
	.popup {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 199;

		&.show {
			display: block;

			.mask {
				animation: showPopup 0.2s linear both;
			}

			.layer {
				animation: showLayer 0.2s linear both;
			}
		}

		&.hide {
			.mask {
				animation: hidePopup 0.2s linear both;
			}

			.layer {
				animation: hideLayer 0.2s linear both;
			}
		}

		&.none {
			display: none;
		}

		.mask {
			position: fixed;
			top: 0;
			width: 100%;
			height: 100%;
			z-index: 1;
			background-color: rgba(0, 0, 0, 0.4);
		}

		.layer {
			position: fixed;
			z-index: 99;
			bottom: 0;
			width: 100%;
			min-height: 40vh;
			border-radius: 10upx 10upx 0 0;
			background-color: #fff;

			.btn {
				height: 66upx;
				line-height: 66upx;
				border-radius: 100upx;
				background: $uni-color-primary;
				font-size: $font-base + 2upx;
				color: #fff;
				margin: 30upx auto 20upx;
				position: absolute;
				width: calc(100% - 60rpx);
				bottom: 20rpx;
			}
		}

		@keyframes showPopup {
			0% {
				opacity: 0;
			}

			100% {
				opacity: 1;
			}
		}

		@keyframes hidePopup {
			0% {
				opacity: 1;
			}

			100% {
				opacity: 0;
			}
		}

		@keyframes showLayer {
			0% {
				transform: translateY(120%);
			}

			100% {
				transform: translateY(0%);
			}
		}

		@keyframes hideLayer {
			0% {
				transform: translateY(0);
			}

			100% {
				transform: translateY(120%);
			}
		}
	}

	/* 底部操作菜单 */
	.page-bottom {
		position: fixed;
		left: 30upx;
		bottom: 30upx;
		z-index: 95;
		display: flex;
		justify-content: center;
		align-items: center;
		width: 690upx;
		height: 100upx;
		background: rgba(255, 255, 255, .9);
		box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
		border-radius: 16upx;

		.p-b-btn {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			font-size: $font-sm;
			color: $font-color-base;
			/* width: 96upx; */
			width: 112upx;
			height: 80upx;
			position: relative;

			uni-badge {
				position: absolute;
				right: 0;
				top: -8rpx;
			}

			.yticon {
				font-size: 40upx;
				line-height: 48upx;
				color: $font-color-light;
			}

			&.active,
			&.active .yticon {
				color: $uni-color-primary;
			}

			.icon-fenxiang2 {
				font-size: 42upx;
				transform: translateY(-2upx);
			}

			.icon-shoucang {
				font-size: 46upx;
			}
		}

		.action-btn-group {
			display: flex;
			height: 76upx;
			border-radius: 100px;
			overflow: hidden;
			box-shadow: 0 20upx 40upx -16upx #fa436a;
			box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
			background: linear-gradient(to right, #ffac30, #fa436a, #F56C6C);
			margin-left: 20upx;
			position: relative;

			&:after {
				content: '';
				position: absolute;
				top: 50%;
				right: 50%;
				transform: translateY(-50%);
				height: 28upx;
				width: 0;
				border-right: 1px solid rgba(255, 255, 255, .5);
			}

			.action-btn {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 180upx;
				width: 196upx;
				height: 100%;
				font-size: $font-base;
				padding: 0;
				border-radius: 0;
				background: transparent;
			}
		}
	}

	.swiper_current {
		position: absolute;
		height: 70rpx;
		line-height: 70rpx;
		bottom: 70rpx;
		color: #fff;
		right: 90rpx;
		font-size: 28rpx;
	}

	.timeout {
		width: calc(100% - 100rpx);
		height: 70rpx;
		line-height: 70rpx;
		border-radius: 70rpx;
		background: linear-gradient(to right, rgba(255, 0, 0, 1), rgba(250, 67, 106, .5));
		box-shadow: 0 20upx 40upx -16upx #fa436a;
		box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
		color: #fff;
		padding: 0 40rpx;
		position: absolute;
		bottom: 70rpx;
		left: 50rpx;

		view {
			float: left;
		}

		.ts {
			font-size: 30rpx;
			font-weight: bold;
		}

		.h,
		.m,
		.s {
			float: left;
			min-width: 50rpx;
			height: 50rpx;
			line-height: 50rpx;
			text-align: center;
			background-color: #303133;
			border-radius: 10rpx;
			margin-top: 10rpx;
			font-size: 24rpx;
			margin-left: 35rpx;
		}
	}

	.merchant-v {
		width: 95%;
		padding: 30upx;
		margin: 0 2.5%;
		background-color: #fff;
		display: flex;
		margin-top: 20rpx;
		border-radius: 16rpx;
		box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);

		view {
			image {
				width: 100rpx;
				height: 100rpx;
				border-radius: 100rpx;
				overflow: hidden;
				float: left;
			}
		}

		.merchant-v-l {
			width: 100rpx;
			height: 100rpx;
		}

		.merchant-v-r {
			width: calc(100% - 100rpx);
			height: 100rpx;
			padding-left: 20rpx;

			.top,
			.bottom {
				display: block;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				word-break: break-all;
				color: $font-color-dark;
			}

			.top {
				margin-top: 8rpx;
				font-size: 28rpx;
			}

			.bottom {
				margin-top: 6rpx;
				font-size: 24rpx;

				.addre {
					color: $font-color-light;
				}
			}
		}
	}

	.numa {
		color: #FA436A;
	}

	.gmjl {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;

		image {
			width: 100rpx;
			height: 100rpx;
			border-radius: 100rpx;
			margin: 0 15rpx;
			margin-top: 30rpx;
		}
	}

	.ycyc {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		word-break: break-all;
	}

	.jgms {
		width: 95%;
		margin: 0 2.5%;
		padding: 20rpx 30rpx;
		border-radius: 16rpx;
		background-color: #fff;
		font-size: 28rpx;
		margin-top: 40rpx;
		box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);

		.bt-v {
			color: red;
			font-weight: bold;
			margin-top: 10rpx;
			height: 40rpx;
			line-height: 46rpx;

			text {
				border-bottom: 4rpx solid;
			}
		}

		.nr-v {
			margin-top: 10rpx;
			color: #303133;
		}
	}
</style>
